<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Ustr - 1.0.4 reference documentation -- structs</title>
    <style type="text/css">
      A:visited { color: #ff4040; }
      A:hover { color: #20b2aa; }

      P { text-indent: 1em; }

      body     { background: #FFF; color: #000; }

      h2.ind   { background: #DDF; }

      td.title { background: #DFD; }
      td.sect  { background: #DDF; }
      td.obj   { background: #DDD; }

      ul li                       { list-style-type: lower-roman; }
      ul li:hover                 { list-style-type: square; }
      ul:hover li                 { list-style-type: decimal; }
      ul li:hover ul li.obj       { list-style-type: decimal; }
      ul li:hover ul li.obj:hover { list-style-type: square; }
    </style>

  </head>
  <body>
<table width="100%"><tr><td bgcolor="#DDFFDD"><h1>Ustr - 1.0.4 reference documentation -- structs (3)</h1>
</td></tr></table><table width="90%"><tr><td>
<h2 class="ind">Index of sections</h2>
<ul>
<li><a href="#indx-Members_of_Ustr_pool">Members of Ustr_pool (3)</a></ul>
<h2 class="ind">Index of sections, and their contents</h2>
<ul>
<li><a id="indx-Members_of_Ustr_pool" href="#Members_of_Ustr_pool">Members of Ustr_pool</a>
<ul>
<li class="obj"><a href="#pool_sys_malloc">pool_sys_malloc()</a>
<li class="obj"><a href="#pool_sys_realloc">pool_sys_realloc()</a>
<li class="obj"><a href="#pool_sys_free">pool_sys_free()</a>
</ul></ul>
</td></tr></table><table width="90%"><tr><td class="sect"><h2><a id="Members%20of%20Ustr_pool">Members of Ustr_pool</a></h2>
</td></tr></table><table width="80%"><tr><td class="obj">
<strong>Function: </strong> <a id="pool_sys_malloc">pool_sys_malloc()</a>
<br>Returns: Allocated data<br>Type: void *
</td></tr><tr><td>Parameter<strong>[1]</strong>: <a href="design.html#possibilities">Ustr pool</a> object<br>Type<strong>[1]</strong>: void *
</td></tr><tr><td>Parameter<strong>[2]</strong>: Length of new allocation<br>Type<strong>[2]</strong>: size_t
</td></tr><tr><td><strong>Explanation:</strong></td></tr><tr><td><p>
</p><p>  This is a callback to provide a similar usage to malloc().
</p><p>  This works like malloc() but allocates at least size (Parameter[2]) memory
 from the pool (Parameter[1]), or it returns NULL on failure.


</td></tr></table><table width="80%"><tr><td class="obj">
<strong>Function: </strong> <a id="pool_sys_realloc">pool_sys_realloc()</a>
<br>Returns: Re-allocated data<br>Type: void *
</td></tr><tr><td>Parameter<strong>[1]</strong>: <a href="design.html#possibilities">Ustr pool</a> object<br>Type<strong>[1]</strong>: void *
</td></tr><tr><td>Parameter<strong>[2]</strong>: Pointer to the old data<br>Type<strong>[2]</strong>: void *
</td></tr><tr><td>Parameter<strong>[3]</strong>: Length of old allocation<br>Type<strong>[3]</strong>: size_t
</td></tr><tr><td>Parameter<strong>[4]</strong>: Length of new allocation<br>Type<strong>[4]</strong>: size_t
</td></tr><tr><td><strong>Explanation:</strong></td></tr><tr><td><p>
</p><p>  This is a callback to provide a similar usage to realloc().
</p><p>  The Ustr <a href="functions.html#ustr_pool_make">ustr_pool_make()</a> varient works like realloc() but allocates at least
 size (Parameter[4]) memory from the pool (Parameter[1]) and copies the old
 data into it, or it returns NULL on failure.

</td></tr><tr><td><strong>Note:</strong></td></tr><tr><td><p>
</p><p>  If the old data was the last thing allocated from the pool, it might be
 resized on success.
</p><p>  If the old data was larger than the new data, the pointer to the old data is
 always returned.

</td></tr></table><table width="80%"><tr><td class="obj">
<strong>Function: </strong> <a id="pool_sys_free">pool_sys_free()</a>
<br>Returns: Nothing<br>Type: void
</td></tr><tr><td>Parameter<strong>[1]</strong>: <a href="design.html#possibilities">Ustr pool</a> object<br>Type<strong>[1]</strong>: void *
</td></tr><tr><td>Parameter<strong>[2]</strong>: Pointer to the data<br>Type<strong>[2]</strong>: void *
</td></tr><tr><td><strong>Explanation:</strong></td></tr><tr><td><p>
</p><p>  This is a callback to provide a similar usage to free().
</p><p>  The Ustr <a href="functions.html#ustr_pool_make">ustr_pool_make()</a> varient free's the data, if it was the last thing
 allocated from the pool. Otherwise it does nothing.


</td></tr></table>
</body></html>